import 'package:flutter/material.dart';
import 'package:yp/helper.dart';
import 'package:yp/router.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:get/get.dart';

import 'logic.dart';
import 'state.dart';

class CommodityDetailsPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _CommodityDetailsPage();
  }
}

class _CommodityDetailsPage extends State<CommodityDetailsPage> {
  final CommodityDetailsLogic logic = Get.put(CommodityDetailsLogic());
  final CommodityDetailsState state = Get.find<CommodityDetailsLogic>().state;
  int typeIndex = 2;

  @override
  Widget build(BuildContext context) {
    // typeIndex  0 商品详情  1 预售详情  2 拼团详情

    return Scaffold(
      // appBar: AppBar(
      //   centerTitle: true,
      //   elevation: 0,
      //   backgroundColor: Colors.red,
      //   title: Text(
      //     '商品',
      //     style: TextStyle(
      //       color: Colors.white,
      //       fontSize: 18,
      //     ),
      //   ),
      //   iconTheme: IconThemeData(
      //     color: Colors.white,
      //   ),
      // ),
      body: GetBuilder<CommodityDetailsLogic>(
        builder: (logic) {
          return Stack(
            children: [
              Container(
                color: Color(0xffF3F4F6),
                child: Column(
                  children: [
                    Expanded(
                      child: Container(
                        child: ListView.separated(
                          padding: EdgeInsets.zero,
                          itemBuilder: (context, index) {
                            if (index == 0) {
                              return _goodsNameWidget(typeIndex: typeIndex);
                            } else if (index == 1) {
                              if (typeIndex == 0) {
                                return _salesPromotionWidget(); // 促销
                              } else if (typeIndex == 1) {
                                return _distributionWidget(); // 配送
                              } else {
                                return _pinTuanWidget(); // 拼团 配送
                              }
                            } else if (index == 2) {
                              return _evaluateWidget();
                            } else if (index == 3) {
                              return _specificationParametersWidget();
                            } else {
                              return _imageTextDetailsWidget();
                            }
                          },
                          separatorBuilder: (context, index) {
                            return SizedBox(
                              height: setWidth(20),
                            );
                          },
                          itemCount: 5,
                        ),
                      ),
                    ),
                    Container(
                      color: Colors.white,
                      height: 50 + ScreenUtil().bottomBarHeight,
                      padding: EdgeInsets.only(
                        bottom: ScreenUtil().bottomBarHeight,
                      ),
                      child: typeIndex == 0
                          ? Container(
                              padding: EdgeInsets.symmetric(
                                  horizontal: setWidth(20)),
                              child: Row(
                                mainAxisAlignment:
                                    MainAxisAlignment.spaceBetween,
                                crossAxisAlignment: CrossAxisAlignment.center,
                                children: [
                                  Row(
                                    children: [
                                      Image.asset(
                                        'assets/images/detailsShoppingCart_image.png',
                                        width: setWidth(56),
                                        height: setWidth(56),
                                        fit: BoxFit.cover,
                                      ),
                                      SizedBox(
                                        width: setWidth(40),
                                      ),
                                      Image.asset(
                                        'assets/images/notCollected_image.png',
                                        width: setWidth(56),
                                        height: setWidth(56),
                                        fit: BoxFit.cover,
                                      ),
                                      SizedBox(
                                        width: setWidth(40),
                                      ),
                                      Image.asset(
                                        'assets/images/keFu_image.png',
                                        width: setWidth(56),
                                        height: setWidth(56),
                                        fit: BoxFit.cover,
                                      ),
                                    ],
                                  ),
                                  Row(
                                    children: [
                                      InkWell(
                                        onTap: () {
                                          print('====== 加入购物车 ====== 点击事件！！！！');
                                        },
                                        child: Container(
                                          width: setWidth(220),
                                          height: setWidth(76),
                                          decoration: BoxDecoration(
                                            color: Color(0xff210F0F),
                                            borderRadius: BorderRadius.only(
                                              topLeft:
                                                  Radius.circular(setWidth(38)),
                                              bottomLeft:
                                                  Radius.circular(setWidth(38)),
                                            ),
                                          ),
                                          alignment: Alignment.center,
                                          child: Text(
                                            '加入购物车',
                                            style: TextStyle(
                                              color: Colors.white,
                                              fontSize: 15,
                                            ),
                                          ),
                                        ),
                                      ),
                                      InkWell(
                                        onTap: () {
                                          print('====== 立即购买 ====== 点击事件！！！！');
                                          _specificationsShow();
                                        },
                                        child: Container(
                                          width: setWidth(220),
                                          height: setWidth(76),
                                          decoration: BoxDecoration(
                                            color: Color(0xffEA5504),
                                            borderRadius: BorderRadius.only(
                                              topRight:
                                                  Radius.circular(setWidth(38)),
                                              bottomRight:
                                                  Radius.circular(setWidth(38)),
                                            ),
                                          ),
                                          alignment: Alignment.center,
                                          child: Text(
                                            '立即购买',
                                            style: TextStyle(
                                              color: Colors.white,
                                              fontSize: 15,
                                            ),
                                          ),
                                        ),
                                      ),
                                    ],
                                  ),
                                ],
                              ),
                            )
                          : typeIndex == 1
                              ? Container(
                                  padding: EdgeInsets.symmetric(
                                      horizontal: setWidth(40)),
                                  child: Row(
                                    mainAxisAlignment:
                                        MainAxisAlignment.spaceBetween,
                                    crossAxisAlignment:
                                        CrossAxisAlignment.center,
                                    children: [
                                      Row(
                                        children: [
                                          Image.asset(
                                            'assets/images/notCollected_image.png',
                                            width: setWidth(56),
                                            height: setWidth(56),
                                            fit: BoxFit.cover,
                                          ),
                                          SizedBox(
                                            width: setWidth(40),
                                          ),
                                          Image.asset(
                                            'assets/images/keFu_image.png',
                                            width: setWidth(56),
                                            height: setWidth(56),
                                            fit: BoxFit.cover,
                                          ),
                                        ],
                                      ),
                                      InkWell(
                                        // Book now
                                        onTap: () {
                                          print('====== 立即预定 ====== 点击事件！！！！');
                                        },
                                        child: Container(
                                          width: setWidth(400),
                                          height: setWidth(76),
                                          decoration: BoxDecoration(
                                            color: Color(0xff0DA460),
                                            borderRadius: BorderRadius.circular(
                                                setWidth(38)),
                                          ),
                                          alignment: Alignment.center,
                                          child: Text(
                                            '立即预定',
                                            style: TextStyle(
                                              color: Colors.white,
                                              fontSize: 15,
                                            ),
                                          ),
                                        ),
                                      ),
                                    ],
                                  ),
                                )
                              : Container(
                                  child: Row(
                                    children: [
                                      InkWell(
                                        onTap: () {
                                          print('直接购买¥199  点击事件！！！');
                                        },
                                        child: Container(
                                          width: setWidth(375),
                                          color: Colors.white,
                                          alignment: Alignment.center,
                                          child: Text(
                                            '直接购买¥199',
                                            style: TextStyle(
                                              color: Color(0xff222222),
                                              fontSize: 17,
                                            ),
                                          ),
                                        ),
                                      ),
                                      InkWell(
                                        onTap: () {
                                          print('我要开团¥189  点击事件！！！');
                                        },
                                        child: Container(
                                          width: setWidth(375),
                                          color: Color(0xffEA5504),
                                          alignment: Alignment.center,
                                          child: Text(
                                            '我要开团¥189',
                                            style: TextStyle(
                                              color: Colors.white,
                                              fontSize: 17,
                                            ),
                                          ),
                                        ),
                                      ),
                                    ],
                                  ),
                                ),
                    ),
                  ],
                ),
              ),
              Container(
                height: 44 + ScreenUtil().statusBarHeight,
                color: Colors.transparent,
                padding: EdgeInsets.only(
                  top: ScreenUtil().statusBarHeight,
                ),
                child: Container(
                  height: 44,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      InkWell(
                        onTap: () {
                          print('+++++++++ 返回🔙 +++++++++');
                          Navigator.pop(context);
                        },
                        child: Container(
                          height: 44,
                          width: 44,
                          child: Icon(
                            Icons.arrow_back_ios,
                            size: setWidth(34),
                            color: Colors.white,
                          ),
                        ),
                      ),
                      Text(
                        '商品 评价 图文',
                        style: TextStyle(
                          color: Colors.white,
                          fontSize: 18,
                        ),
                      ),
                      InkWell(
                        onTap: () {
                          print('+++++++++ ！！！分享点击事件！！！ +++++++++');
                          _shareShow();
                        },
                        child: Container(
                          height: 44,
                          width: 44,
                          padding: EdgeInsets.all(setWidth(26)),
                          child: Image.asset(
                            'assets/images/share_image.png',
                            width: 18,
                            height: 18,
                            fit: BoxFit.cover,
                          ),
                        ),
                      ),
                    ],
                  ),
                ),
              ),
            ],
          );
        },
      ),
    );
  }

  // 商品名字
  Widget _goodsNameWidget({
    int typeIndex,
  }) {
    return Container(
      color: Colors.white,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            width: setWidth(750),
            height: setWidth(750),
            child: Swiper(
              autoplay: false, // true,
              onIndexChanged: (int index) {
                print('++++ onIndexChanged ++++ 滑动结束！！！');
              },
              onTap: (int index) {
                print('++++ onTap ++++ 点击事件！！！');
              },
              itemCount: 5,
              itemBuilder: (BuildContext context, int index) {
                return Container(
                  alignment: Alignment.center,
                  child: Image.asset(
                    'assets/images/goods_images.jpeg',
                    width: setWidth(750),
                    height: setWidth(750),
                    fit: BoxFit.cover,
                  ),
                );
              },
              pagination: SwiperPagination(),
            ),
          ),
          typeIndex == 0
              ? Padding(
                  padding: EdgeInsets.symmetric(horizontal: setWidth(22)),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Padding(
                        padding: EdgeInsets.only(
                          top: setWidth(14),
                          bottom: setWidth(16),
                        ),
                        child: Text(
                          '方太（FOTILE）JCD9A+TH26B 吸油烟机燃气灶 侧吸天然气烟灶套装家用 抽排油烟机灶具风魔方5.0kW灶',
                          style: TextStyle(
                            color: Colors.black,
                            fontWeight: FontWeight.bold,
                            fontSize: 16,
                          ),
                        ),
                      ),
                      Text.rich(
                        TextSpan(
                          children: [
                            TextSpan(
                              text: '￥',
                              style: TextStyle(
                                color: Color(0xffEA5504),
                                fontSize: 12,
                              ),
                            ),
                            TextSpan(
                              text: '5399.00',
                              style: TextStyle(
                                color: Color(0xffEA5504),
                                fontSize: 20,
                              ),
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
                )
              : typeIndex == 1
                  ? Column(
                      children: [
                        Container(
                          height: setWidth(120),
                          decoration: BoxDecoration(
                            gradient: LinearGradient(
                              begin: Alignment.centerLeft,
                              end: Alignment.centerRight,
                              colors: [
                                Color(0xff09B266),
                                Color(0xff0E8851),
                              ],
                            ),
                          ),
                          padding:
                              EdgeInsets.symmetric(horizontal: setWidth(20)),
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Column(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                mainAxisAlignment: MainAxisAlignment.center,
                                children: [
                                  Text(
                                    '预售价',
                                    style: TextStyle(
                                        color: Colors.white, fontSize: 12),
                                  ),
                                  Text.rich(
                                    TextSpan(
                                      children: [
                                        TextSpan(
                                          text: '¥',
                                          style: TextStyle(
                                            color: Colors.white,
                                            fontSize: 12,
                                          ),
                                        ),
                                        TextSpan(
                                          text: '189',
                                          style: TextStyle(
                                            color: Colors.white,
                                            fontSize: 28,
                                          ),
                                        ),
                                        WidgetSpan(
                                            child: SizedBox(
                                          width: setWidth(14),
                                        )),
                                        TextSpan(
                                          text: '原价:¥199',
                                          style: TextStyle(
                                            color: Colors.white,
                                            fontSize: 12,
                                            decoration:
                                                TextDecoration.lineThrough,
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                ],
                              ),
                              Column(
                                crossAxisAlignment: CrossAxisAlignment.center,
                                mainAxisAlignment: MainAxisAlignment.center,
                                children: [
                                  Text(
                                    '即将开售',
                                    style: TextStyle(
                                      color: Colors.white,
                                      fontSize: 16,
                                    ),
                                  ),
                                  SizedBox(
                                    height: setWidth(4),
                                  ),
                                  Text(
                                    '9月18日 10:00开售',
                                    style: TextStyle(
                                      color: Color(0xffF8E71C),
                                      fontSize: 12,
                                    ),
                                  ),
                                ],
                              ),
                            ],
                          ),
                        ),
                        Padding(
                          padding:
                              EdgeInsets.symmetric(horizontal: setWidth(22)),
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              Padding(
                                padding: EdgeInsets.only(
                                  top: setWidth(24),
                                  bottom: setWidth(16),
                                ),
                                child: Text(
                                  '方太（FOTILE）JCD9A+TH26B 吸油烟机燃气灶 侧吸天然气烟灶套装家用 抽排油烟机灶具风魔方5.0kW灶',
                                  style: TextStyle(
                                    color: Colors.black,
                                    fontWeight: FontWeight.bold,
                                    fontSize: 16,
                                  ),
                                ),
                              ),
                              Text.rich(
                                TextSpan(
                                  children: [
                                    TextSpan(
                                      text: '￥',
                                      style: TextStyle(
                                        color: Color(0xff0DA460),
                                        fontSize: 12,
                                      ),
                                    ),
                                    TextSpan(
                                      text: '5399.00',
                                      style: TextStyle(
                                        color: Color(0xff0DA460),
                                        fontSize: 20,
                                      ),
                                    ),
                                    WidgetSpan(
                                        child: SizedBox(
                                      width: setWidth(30),
                                    )),
                                    TextSpan(
                                      text: '￥99.00',
                                      style: TextStyle(
                                        color: Color(0xff0DA460),
                                        fontSize: 14,
                                        decoration: TextDecoration.lineThrough,
                                      ),
                                    ),
                                  ],
                                ),
                              ),
                              SizedBox(
                                height: setWidth(16),
                              ),
                              Row(
                                mainAxisAlignment:
                                    MainAxisAlignment.spaceBetween,
                                children: [
                                  Expanded(
                                    child: Text(
                                      '现在开始预订，预计2019年10月12日发货',
                                      style: TextStyle(
                                        color: Color(0xff0F0F0F),
                                        fontSize: 12,
                                      ),
                                    ),
                                  ),
                                  SizedBox(
                                    width: setWidth(20),
                                  ),
                                  Text(
                                    '已售12233件',
                                    style: TextStyle(
                                      color: Color(0xffA3A3A3),
                                      fontSize: 10,
                                    ),
                                  ),
                                ],
                              ),
                            ],
                          ),
                        ),
                      ],
                    )
                  : Column(
                      children: [
                        Container(
                          height: setWidth(120),
                          decoration: BoxDecoration(
                            image: DecorationImage(
                              image: AssetImage(
                                  'assets/images/groupBackground_image.png'),
                              fit: BoxFit.cover,
                            ),
                          ),
                          padding:
                              EdgeInsets.symmetric(horizontal: setWidth(20)),
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Row(
                                crossAxisAlignment: CrossAxisAlignment.center,
                                children: [
                                  Text.rich(
                                    TextSpan(
                                      children: [
                                        TextSpan(
                                          text: '¥',
                                          style: TextStyle(
                                            color: Colors.white,
                                            fontSize: 12,
                                          ),
                                        ),
                                        TextSpan(
                                          text: '189',
                                          style: TextStyle(
                                            color: Colors.white,
                                            fontSize: 28,
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                  SizedBox(
                                    width: setWidth(16),
                                  ),
                                  Column(
                                    crossAxisAlignment:
                                        CrossAxisAlignment.start,
                                    mainAxisAlignment: MainAxisAlignment.center,
                                    children: [
                                      Container(
                                        height: setWidth(28),
                                        decoration: BoxDecoration(
                                          borderRadius: BorderRadius.circular(
                                              setWidth(6)),
                                          border: Border.all(
                                            color: Colors.white,
                                            width: setWidth(1),
                                          ),
                                        ),
                                        padding: EdgeInsets.symmetric(
                                            horizontal: setWidth(8)),
                                        alignment: Alignment.center,
                                        child: Text(
                                          '3人团',
                                          style: TextStyle(
                                              color: Colors.white, fontSize: 9),
                                        ),
                                      ),
                                      SizedBox(
                                        height: setWidth(8),
                                      ),
                                      Row(
                                        children: [
                                          Text(
                                            '单买:¥199',
                                            style: TextStyle(
                                              color: Colors.white,
                                              fontSize: 12,
                                              decoration:
                                                  TextDecoration.lineThrough,
                                            ),
                                          ),
                                          SizedBox(
                                            width: setWidth(20),
                                          ),
                                          Container(
                                            padding: EdgeInsets.symmetric(
                                                horizontal: setWidth(12)),
                                            height: setWidth(32),
                                            decoration: BoxDecoration(
                                              color: Color(0xffffeeb6),
                                              borderRadius:
                                                  BorderRadius.circular(
                                                      setWidth(20)),
                                            ),
                                            alignment: Alignment.center,
                                            child: Text(
                                              '3445已售',
                                              style: TextStyle(
                                                color: Color(0xffEA3E04),
                                                fontSize: 11,
                                              ),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ],
                                  ),
                                ],
                              ),
                              Column(
                                crossAxisAlignment: CrossAxisAlignment.end,
                                mainAxisAlignment: MainAxisAlignment.center,
                                children: [
                                  Text(
                                    '距结束',
                                    style: TextStyle(
                                      color: Colors.white,
                                      fontSize: 12,
                                    ),
                                  ),
                                  Text(
                                    '12:35:01',
                                    style: TextStyle(
                                      color: Colors.white,
                                      fontSize: 18,
                                    ),
                                  ),
                                ],
                              ),
                            ],
                          ),
                        ),
                        SizedBox(
                          height: setWidth(24),
                        ),
                        Padding(
                          padding:
                              EdgeInsets.symmetric(horizontal: setWidth(20)),
                          child: Text.rich(
                            TextSpan(
                              children: [
                                WidgetSpan(
                                  child: Row(
                                    mainAxisSize: MainAxisSize.min,
                                    children: [
                                      Column(
                                        children: [
                                          Container(
                                            decoration: BoxDecoration(
                                              color: Color(0xffF50D2F),
                                              borderRadius:
                                                  BorderRadius.circular(
                                                      setWidth(4)),
                                            ),
                                            padding: EdgeInsets.symmetric(
                                                horizontal: setWidth(8)),
                                            alignment: Alignment.center,
                                            child: Text(
                                              '新人团',
                                              style: TextStyle(
                                                color: Colors.white,
                                                fontSize: 8,
                                              ),
                                            ),
                                          ),
                                          SizedBox(
                                            height: setWidth(5),
                                          ),
                                        ],
                                      ),
                                      SizedBox(
                                        width: setWidth(10),
                                      ),
                                    ],
                                  ),
                                ),
                                TextSpan(
                                    text:
                                        '方太（FOTILE）JCD9A+TH26B 吸油烟机燃气灶 侧吸天然气烟灶套装家用 抽排油烟机灶具风魔方5.0kW灶',
                                    style: TextStyle(
                                      color: Colors.black,
                                      fontSize: 16,
                                      fontWeight: FontWeight.bold,
                                    )),
                              ],
                            ),
                          ),
                        ),
                      ],
                    ),
          SizedBox(
            height: setWidth(20),
          ),
        ],
      ),
    );
  }

  // 促销
  Widget _salesPromotionWidget() {
    return Column(
      children: [
        Container(
          color: Colors.white,
          child: Column(
            children: [
              Container(
                height: setWidth(84),
                padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
                child: Row(
                  children: [
                    Text(
                      '促销',
                      style: TextStyle(
                        color: Color(0xff666666),
                        fontSize: 14,
                      ),
                    ),
                    Padding(
                      padding: EdgeInsets.only(
                        left: setWidth(22),
                        right: setWidth(16),
                      ),
                      child: Container(
                        width: setWidth(56),
                        height: setWidth(28),
                        decoration: BoxDecoration(
                          color: Color(0x1AEF2F45),
                          border: Border.all(
                            color: Color(0xffEF2F45),
                            width: setWidth(1),
                          ),
                          borderRadius: BorderRadius.circular(setWidth(4)),
                        ),
                        alignment: Alignment.center,
                        child: Text(
                          '满减',
                          style: TextStyle(
                            color: Color(0xffEF2F45),
                            fontSize: 11,
                          ),
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '满199元减100元',
                        maxLines: 1,
                        style: TextStyle(
                          color: Color(0xffEF2F45),
                          fontSize: 14,
                        ),
                      ),
                    ),
                  ],
                ),
              ),
              Divider(
                height: setWidth(1),
                color: Color(0xffefefef),
                indent: setWidth(86),
                endIndent: 0,
              ),
              Container(
                height: setWidth(84),
                padding: EdgeInsets.only(
                  left: setWidth(94),
                  right: setWidth(20),
                ),
                child: Row(
                  children: [
                    Container(
                      width: setWidth(56),
                      height: setWidth(28),
                      decoration: BoxDecoration(
                        color: Color(0x1AEF2F45),
                        border: Border.all(
                          color: Color(0xffEF2F45),
                          width: setWidth(1),
                        ),
                        borderRadius: BorderRadius.circular(setWidth(4)),
                      ),
                      alignment: Alignment.center,
                      child: Text(
                        '秒杀',
                        style: TextStyle(
                          color: Color(0xffEF2F45),
                          fontSize: 11,
                        ),
                      ),
                    ),
                    SizedBox(
                      width: setWidth(16),
                    ),
                    Expanded(
                      child: Text(
                        '每人每天购买不超过3件',
                        maxLines: 1,
                        style: TextStyle(
                          color: Color(0xffEF2F45),
                          fontSize: 14,
                        ),
                      ),
                    ),
                  ],
                ),
              ),
              Divider(
                height: setWidth(1),
                color: Color(0xffefefef),
                indent: setWidth(86),
                endIndent: 0,
              ),
              Container(
                height: setWidth(84),
                padding: EdgeInsets.only(
                  left: setWidth(94),
                  right: setWidth(20),
                ),
                child: Row(
                  children: [
                    Container(
                      width: setWidth(100),
                      height: setWidth(28),
                      decoration: BoxDecoration(
                        color: Color(0x1AEF2F45),
                        border: Border.all(
                          color: Color(0xffEF2F45),
                          width: setWidth(1),
                        ),
                        borderRadius: BorderRadius.circular(setWidth(4)),
                      ),
                      alignment: Alignment.center,
                      child: Text(
                        '积分优惠',
                        style: TextStyle(
                          color: Color(0xffEF2F45),
                          fontSize: 11,
                        ),
                      ),
                    ),
                    SizedBox(
                      width: setWidth(16),
                    ),
                    Expanded(
                      child: Text(
                        '使用20积分可享受优惠价39元',
                        maxLines: 1,
                        style: TextStyle(
                          color: Color(0xff333333),
                          fontSize: 14,
                        ),
                      ),
                    ),
                  ],
                ),
              ),
              Divider(
                height: setWidth(1),
                color: Color(0xffefefef),
                indent: setWidth(86),
                endIndent: 0,
              ),
              Container(
                height: setWidth(104),
                padding: EdgeInsets.only(
                  left: setWidth(20),
                  right: setWidth(20),
                  bottom: setWidth(7),
                ),
                child: Row(
                  children: [
                    Expanded(
                      child: Row(
                        children: [
                          Text(
                            '领券',
                            style: TextStyle(
                              color: Color(0xff717171),
                              fontSize: 14,
                            ),
                          ),
                          SizedBox(
                            width: setWidth(20),
                          ),
                          Expanded(
                            child: Text(
                              '10元新人券，3元无门槛券，10元新人券',
                              style: TextStyle(
                                color: Color(0xffEA5504),
                                fontSize: 14,
                              ),
                            ),
                          ),
                        ],
                      ),
                    ),
                    SizedBox(
                      width: setWidth(20),
                    ),
                    Image.asset(
                      'assets/images/goodsMore_image.png',
                      width: setWidth(40),
                      height: setWidth(12),
                      fit: BoxFit.cover,
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
        SizedBox(
          height: setWidth(20),
        ),
        Container(
          color: Colors.white,
          height: setWidth(88),
          padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
          child: Row(
            children: [
              Text(
                '已选',
                style: TextStyle(
                  color: Color(0xff666666),
                  fontSize: 14,
                ),
              ),
              SizedBox(
                width: setWidth(28),
              ),
              Expanded(
                child: Text(
                  '22超大风量+挥手智控',
                  maxLines: 1,
                  overflow: TextOverflow.ellipsis,
                  style: TextStyle(
                    color: Color(0xff222222),
                    fontSize: 14,
                  ),
                ),
              ),
              SizedBox(
                width: setWidth(20),
              ),
              Image.asset(
                'assets/images/icon-left.png',
                width: setWidth(14),
                height: setWidth(22),
                fit: BoxFit.cover,
              ),
            ],
          ),
        ),
      ],
    );
  }

  // 配送（预售）
  Widget _distributionWidget() {
    return Column(
      children: [
        Container(
          height: setWidth(88),
          color: Colors.white,
          padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
          child: Row(
            children: [
              Text(
                '配送',
                style: TextStyle(
                  color: Color(0xff717171),
                  fontSize: 14,
                ),
              ),
              SizedBox(
                width: setWidth(22),
              ),
              Expanded(
                child: Text(
                  '最快半小时达、门店自提',
                  maxLines: 1,
                  overflow: TextOverflow.ellipsis,
                  style: TextStyle(
                    color: Color(0xff222222),
                    fontSize: 14,
                  ),
                ),
              ),
            ],
          ),
        ),
        SizedBox(
          height: setWidth(20),
        ),
        Container(
          height: setWidth(88),
          color: Colors.white,
          padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
          child: Row(
            children: [
              Text(
                '已选',
                style: TextStyle(
                  color: Color(0xff666666),
                  fontSize: 14,
                ),
              ),
              SizedBox(
                width: setWidth(22),
              ),
              Expanded(
                child: Text(
                  '1/袋',
                  maxLines: 1,
                  overflow: TextOverflow.ellipsis,
                  style: TextStyle(
                    color: Color(0xff222222),
                    fontSize: 14,
                  ),
                ),
              ),
              SizedBox(
                width: setWidth(20),
              ),
              Image.asset(
                'assets/images/icon-left.png',
                width: setWidth(14),
                height: setWidth(22),
                color: Color(0xffA3A3A3),
                fit: BoxFit.cover,
              ),
            ],
          ),
        ),
      ],
    );
  }

  // 配送 (拼团)
  Widget _pinTuanWidget() {
    return Column(
      children: [
        Container(
          height: setWidth(88),
          color: Colors.white,
          padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
          child: Row(
            children: [
              Text(
                '配送方式',
                style: TextStyle(
                  color: Color(0xff666666),
                  fontSize: 15,
                ),
              ),
              SizedBox(
                width: setWidth(22),
              ),
              Expanded(
                child: Text(
                  '最快半小时达、门店自提',
                  maxLines: 1,
                  overflow: TextOverflow.ellipsis,
                  style: TextStyle(
                    color: Color(0xff333333),
                    fontSize: 14,
                  ),
                ),
              ),
            ],
          ),
        ),
        SizedBox(
          height: setWidth(20),
        ),
        Container(
          height: setWidth(88),
          color: Colors.white,
          padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
          child: Row(
            children: [
              Text(
                '已选',
                style: TextStyle(
                  color: Color(0xff666666),
                  fontSize: 15,
                ),
              ),
              SizedBox(
                width: setWidth(18),
              ),
              Expanded(
                child: Text(
                  '22个/箱',
                  maxLines: 1,
                  overflow: TextOverflow.ellipsis,
                  style: TextStyle(
                    color: Color(0xffEA5504),
                    fontSize: 14,
                  ),
                ),
              ),
              SizedBox(
                width: setWidth(20),
              ),
              Image.asset(
                'assets/images/icon-left.png',
                width: setWidth(12),
                height: setWidth(22),
                color: Color(0xffADADAD),
                fit: BoxFit.cover,
              ),
            ],
          ),
        ),
        SizedBox(
          height: setWidth(20),
        ),
        // 已拼
        Container(
          color: Colors.white,
          child: Column(
            children: [
              Container(
                height: setWidth(76),
                color: Colors.white,
                padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text.rich(
                      TextSpan(
                        children: [
                          TextSpan(
                            text: '已拼',
                            style: TextStyle(
                              color: Color(0xff666666),
                              fontSize: 15,
                            ),
                          ),
                          TextSpan(
                            text: '34343',
                            style: TextStyle(
                              color: Color(0xffEA5504),
                              fontSize: 15,
                            ),
                          ),
                          TextSpan(
                            text: '件',
                            style: TextStyle(
                              color: Color(0xff666666),
                              fontSize: 15,
                            ),
                          ),
                        ],
                      ),
                    ),
                    InkWell(
                      onTap: () {
                        print('更多 点击事件！！！！');
                      },
                      child: Container(
                        height: setWidth(76),
                        alignment: Alignment.center,
                        child: Text(
                          '更多',
                          style: TextStyle(
                            color: Color(0xffAAAAAA),
                            fontSize: 13,
                          ),
                        ),
                      ),
                    ),
                  ],
                ),
              ),
              Divider(
                height: setWidth(1),
                indent: 0,
                endIndent: 0,
                color: Color(0xffE7E7E7),
              ),
              Column(
                children: [
                  SizedBox(
                    height: setWidth(40),
                  ),
                  Padding(
                    padding: EdgeInsets.symmetric(horizontal: setWidth(30)),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Row(
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            Image.asset(
                              'assets/images/shoppingCart_image.png',
                              width: setWidth(90),
                              height: setWidth(90),
                              fit: BoxFit.cover,
                            ),
                            SizedBox(
                              width: setWidth(20),
                            ),
                            Text(
                              '路人甲的停滞',
                              style: TextStyle(
                                color: Color(0xff222222),
                                fontSize: 14,
                              ),
                            ),
                          ],
                        ),
                        Row(
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.end,
                              children: [
                                Text.rich(
                                  TextSpan(
                                    children: [
                                      TextSpan(
                                          text: '还差',
                                          style: TextStyle(
                                            color: Color(0xff666666),
                                            fontSize: 12,
                                          )),
                                      TextSpan(
                                        text: '1',
                                        style: TextStyle(
                                          color: Color(0xffEA5504),
                                          fontSize: 12,
                                        ),
                                      ),
                                      TextSpan(
                                        text: '人',
                                        style: TextStyle(
                                          color: Color(0xff666666),
                                          fontSize: 12,
                                        ),
                                      ),
                                    ],
                                  ),
                                ),
                                Text(
                                  '剩余01:23:12结束',
                                  style: TextStyle(
                                    color: Color(0xff666666),
                                    fontSize: 12,
                                  ),
                                ),
                              ],
                            ),
                            SizedBox(
                              width: setWidth(20),
                            ),
                            Container(
                              height: setWidth(64),
                              decoration: BoxDecoration(
                                color: Color(0xffEA5504),
                                borderRadius:
                                    BorderRadius.circular(setWidth(32)),
                              ),
                              padding: EdgeInsets.symmetric(
                                  horizontal: setWidth(22)),
                              alignment: Alignment.center,
                              child: Text(
                                '去参团',
                                style: TextStyle(
                                  color: Colors.white,
                                  fontSize: 16,
                                ),
                              ),
                            ),
                          ],
                        ),
                      ],
                    ),
                  ),
                  SizedBox(
                    height: setWidth(28),
                  ),
                  Divider(
                    height: setWidth(1),
                    indent: setWidth(30),
                    endIndent: 0,
                    color: Color(0xffE7E7E7),
                  ),
                ],
              ),
              Column(
                children: [
                  SizedBox(
                    height: setWidth(40),
                  ),
                  Padding(
                    padding: EdgeInsets.symmetric(horizontal: setWidth(30)),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Row(
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            Image.asset(
                              'assets/images/shoppingCart_image.png',
                              width: setWidth(90),
                              height: setWidth(90),
                              fit: BoxFit.cover,
                            ),
                            SizedBox(
                              width: setWidth(20),
                            ),
                            Text(
                              '路人甲的停滞',
                              style: TextStyle(
                                color: Color(0xff222222),
                                fontSize: 14,
                              ),
                            ),
                          ],
                        ),
                        Row(
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.end,
                              children: [
                                Text.rich(
                                  TextSpan(
                                    children: [
                                      TextSpan(
                                          text: '还差',
                                          style: TextStyle(
                                            color: Color(0xff666666),
                                            fontSize: 12,
                                          )),
                                      TextSpan(
                                        text: '1',
                                        style: TextStyle(
                                          color: Color(0xffEA5504),
                                          fontSize: 12,
                                        ),
                                      ),
                                      TextSpan(
                                        text: '人',
                                        style: TextStyle(
                                          color: Color(0xff666666),
                                          fontSize: 12,
                                        ),
                                      ),
                                    ],
                                  ),
                                ),
                                Text(
                                  '剩余01:23:12结束',
                                  style: TextStyle(
                                    color: Color(0xff666666),
                                    fontSize: 12,
                                  ),
                                ),
                              ],
                            ),
                            SizedBox(
                              width: setWidth(20),
                            ),
                            Container(
                              height: setWidth(64),
                              decoration: BoxDecoration(
                                color: Color(0xffEA5504),
                                borderRadius:
                                    BorderRadius.circular(setWidth(32)),
                              ),
                              padding: EdgeInsets.symmetric(
                                  horizontal: setWidth(22)),
                              alignment: Alignment.center,
                              child: Text(
                                '去参团',
                                style: TextStyle(
                                  color: Colors.white,
                                  fontSize: 16,
                                ),
                              ),
                            ),
                          ],
                        ),
                      ],
                    ),
                  ),
                  SizedBox(
                    height: setWidth(28),
                  ),
                  Divider(
                    height: setWidth(1),
                    indent: setWidth(30),
                    endIndent: 0,
                    color: Color(0xffE7E7E7),
                  ),
                ],
              ),
            ],
          ),
        ),
        SizedBox(
          height: setWidth(20),
        ),
        // 拼团玩法
        Container(
          color: Colors.white,
          child: Column(
            children: [
              Container(
                height: setWidth(84),
                padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '拼团玩法',
                      style: TextStyle(
                        color: Color(0xff222222),
                        fontSize: 16,
                      ),
                    ),
                    Row(
                      children: [
                        Text(
                          '详细规则',
                          style: TextStyle(
                            color: Color(0xffaaaaaa),
                            fontSize: 13,
                          ),
                        ),
                        SizedBox(
                          width: setWidth(6),
                        ),
                        Image.asset(
                          'assets/images/icon-left.png',
                          width: setWidth(12),
                          height: setWidth(22),
                          fit: BoxFit.cover,
                        ),
                      ],
                    ),
                  ],
                ),
              ),
              Divider(
                color: Color(0xffe7e7e7),
                height: setWidth(1),
                indent: 0,
                endIndent: 0,
              ),
              Container(
                padding: EdgeInsets.only(
                  left: setWidth(60),
                  top: setWidth(30),
                  right: setWidth(94),
                  bottom: setWidth(40),
                ),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(
                      '1.开团/参团 > 2.邀请好友 > 3.满员发货',
                      style: TextStyle(
                        color: Color(0xff272727),
                        fontSize: 15,
                      ),
                    ),
                    Row(
                      mainAxisAlignment: MainAxisAlignment.end,
                      children: [
                        Text(
                          '不满自动退款',
                          style: TextStyle(
                            color: Color(0xffaaaaaa),
                            fontSize: 13,
                          ),
                        ),
                      ],
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ],
    );
  }

  // 评价
  Widget _evaluateWidget() {
    return Container(
      color: Colors.white,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            height: setWidth(84),
            padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(
                  '顾客评价(876)',
                  style: TextStyle(
                    color: Color(0xff222222),
                    fontSize: 16,
                  ),
                ),
                InkWell(
                  onTap: () {
                    print('查看全部  点击事件！！！');
                    Get.toNamed(RouteConfig.allEvaluation);
                  },
                  child: Container(
                    height: setWidth(84),
                    child: Row(
                      children: [
                        Text(
                          '查看全部',
                          style: TextStyle(
                            color: Color(0xffAAAAAA),
                            fontSize: 12,
                          ),
                        ),
                        SizedBox(
                          width: setWidth(16),
                        ),
                        Image.asset(
                          'assets/images/icon-left.png',
                          width: setWidth(12),
                          height: setWidth(22),
                          color: Color(0xffADADAD),
                          fit: BoxFit.cover,
                        ),
                      ],
                    ),
                  ),
                ),
              ],
            ),
          ),
          Divider(
            height: setWidth(1),
            color: Color(0xffE7E7E7),
            indent: setWidth(20),
            endIndent: 0,
          ),
          Container(
            padding: EdgeInsets.only(
              left: setWidth(20),
              top: setWidth(22),
              right: setWidth(20),
            ),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Row(
                  children: [
                    ClipRRect(
                      borderRadius: BorderRadius.circular(setWidth(32)),
                      child: Image.asset(
                        'assets/images/avatar.png',
                        width: setWidth(64),
                        height: setWidth(64),
                        fit: BoxFit.cover,
                      ),
                    ),
                    SizedBox(
                      width: setWidth(20),
                    ),
                    Expanded(
                      child: Container(
                        height: setWidth(64),
                        child: Column(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: [
                            Text(
                              '路人甲的停滞',
                              maxLines: 1,
                              style: TextStyle(
                                color: Color(0xff222222),
                                fontSize: 14,
                              ),
                            ),
                            Wrap(
                              spacing: setWidth(6),
                              children: ['', '', '', '', '']
                                  .asMap()
                                  .map((key, value) {
                                    return MapEntry(
                                      key,
                                      Container(
                                        width: setWidth(22),
                                        height: setWidth(22),
                                        color: Color(0xfffabe00),
                                      ),
                                    );
                                  })
                                  .values
                                  .toList(),
                            ),
                          ],
                        ),
                      ),
                    ),
                    SizedBox(
                      width: setWidth(20),
                    ),
                    Text(
                      '2019年7月6日 12:23:16',
                      style: TextStyle(
                        color: Color(0xffAAAAAA),
                        fontSize: 11,
                      ),
                    ),
                  ],
                ),
                Padding(
                  padding: EdgeInsets.only(
                    top: setWidth(30),
                    bottom: setWidth(14),
                  ),
                  child: Text(
                    '价廉物美，产品质量好，功能适用、先进，售后服务优。功能适用、先进，售后服务优。，功能适用、先进，售后服务优，功…',
                    style: TextStyle(
                      color: Color(0xff333333),
                      fontSize: 12,
                    ),
                  ),
                ),
                Wrap(
                  spacing: setWidth(20),
                  children: ['', '', '', '']
                      .asMap()
                      .map((key, value) {
                        return MapEntry(
                          key,
                          Container(
                            width: setWidth(160),
                            height: setWidth(160),
                            decoration: BoxDecoration(
                              color: Color(0xffD8D8D8),
                              borderRadius: BorderRadius.circular(setWidth(10)),
                            ),
                          ),
                        );
                      })
                      .values
                      .toList(),
                ),
                SizedBox(
                  height: setWidth(40),
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    InkWell(
                      onTap: () {
                        print('查看全部评价 点击事件！！！');
                        Get.toNamed(RouteConfig.allEvaluation);
                      },
                      child: Container(
                        width: setWidth(180),
                        height: setWidth(50),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(setWidth(25)),
                          border: Border.all(
                            color: Color(0xffcccccc),
                            width: setWidth(1),
                          ),
                        ),
                        alignment: Alignment.center,
                        child: Text(
                          '查看全部评价',
                          style: TextStyle(
                            color: Color(0xff333333),
                            fontSize: 12,
                          ),
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(40),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }

  // 规格参数
  Widget _specificationParametersWidget() {
    return Container(
      color: Colors.white,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            height: setWidth(84),
            padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
            child: Row(
              children: [
                Container(
                  width: setWidth(180),
                  child: Text(
                    '规格参数',
                    style: TextStyle(
                      color: Color(0xff222222),
                      fontSize: 16,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                ),
                Text(
                  '售后保障',
                  style: TextStyle(
                    color: Color(0xff999999),
                    fontSize: 14,
                  ),
                ),
              ],
            ),
          ),
          Divider(
            height: setWidth(1),
            color: Color(0xffE7E7E7),
            indent: setWidth(20),
            endIndent: 0,
          ),
          Container(
            padding: EdgeInsets.only(
              left: setWidth(26),
              top: setWidth(18),
              right: setWidth(26),
              bottom: setWidth(22),
            ),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '品牌：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '方太（FOTILE）',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '商品名称：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '方太JCD7',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '商品编号： ',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '100012758392',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '商品毛重：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '28.0kg',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '商品产地：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '中国大陆',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '操控方式：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '挥手感应',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '能效等级：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '一级能效烟机',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '排风量：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '排风量21(m3/min)',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '类型：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '油烟机烟机',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '面板材质：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '钢化玻璃',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '功能：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '大尺寸，大吸力，智能感应烟机',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '安装尺寸：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '900mm±50mm（烟机宽度）',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '风压：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        ' 401-699(pa)',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
                SizedBox(
                  height: setWidth(6),
                ),
                Row(
                  children: [
                    Container(
                      width: setWidth(200),
                      child: Text(
                        '烟机款式：',
                        style: TextStyle(
                          color: Color(0xff222222),
                          fontSize: 12,
                        ),
                      ),
                    ),
                    Expanded(
                      child: Text(
                        '侧吸式',
                        style: TextStyle(
                          color: Color(0xff666666),
                          fontSize: 12,
                        ),
                      ),
                    ),
                  ],
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }

  // 图文详情
  Widget _imageTextDetailsWidget() {
    return Container(
      color: Colors.white,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            height: setWidth(84),
            padding: EdgeInsets.symmetric(horizontal: setWidth(20)),
            alignment: Alignment.centerLeft,
            child: Text(
              '图文详情',
              style: TextStyle(
                color: Color(0xff222222),
                fontSize: 16,
              ),
            ),
          ),
          Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: ['', '', '', '', '']
                .asMap()
                .map((key, value) {
                  return MapEntry(
                    key,
                    Image.asset(
                      'assets/images/goods_images.jpeg',
                      width: setWidth(750),
                      fit: BoxFit.fitWidth,
                    ),
                  );
                })
                .values
                .toList(),
          ),
        ],
      ),
    );
  }

  // 分享弹框
  _shareShow() {
    return showDialog(
        context: context,
        useSafeArea: false,
        builder: (context) {
          return Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.end,
            children: [
              Container(
                color: Colors.white,
                child: Column(
                  children: [
                    Padding(
                      padding: EdgeInsets.only(
                        top: setWidth(58),
                        bottom: setWidth(80),
                      ),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: [
                          Container(
                            width: setWidth(178),
                            height: setWidth(2),
                            color: Color(0xffD8D8D8),
                          ),
                          Container(
                            width: setWidth(6),
                            height: setWidth(6),
                            decoration: BoxDecoration(
                              color: Color(0xffD8D8D8),
                              borderRadius: BorderRadius.circular(setWidth(3)),
                            ),
                          ),
                          Padding(
                            padding:
                                EdgeInsets.symmetric(horizontal: setWidth(50)),
                            child: Text(
                              '分享至',
                              style: TextStyle(
                                color: Color(0xff666666),
                                fontSize: 13,
                              ),
                            ),
                          ),
                          Container(
                            width: setWidth(6),
                            height: setWidth(6),
                            decoration: BoxDecoration(
                              color: Color(0xffD8D8D8),
                              borderRadius: BorderRadius.circular(setWidth(3)),
                            ),
                          ),
                          Container(
                            width: setWidth(178),
                            height: setWidth(2),
                            color: Color(0xffD8D8D8),
                          ),
                        ],
                      ),
                    ),
                    Row(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        InkWell(
                          onTap: () {
                            print('微信好友  点击事件 ++++++++++');
                          },
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.center,
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: [
                              Image.asset(
                                'assets/images/share1.png',
                                width: setWidth(100),
                                height: setWidth(100),
                                fit: BoxFit.cover,
                              ),
                              SizedBox(
                                height: setWidth(30),
                              ),
                              Text(
                                '微信好友',
                                style: TextStyle(
                                  color: Color(0xff333333),
                                  fontSize: 13,
                                ),
                              ),
                            ],
                          ),
                        ),
                        SizedBox(
                          width: setWidth(180),
                        ),
                        InkWell(
                          onTap: () {
                            print('生成海报  点击事件 ===========');
                            Navigator.pop(context);
                            _generatePosterWidget();
                          },
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.center,
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: [
                              Image.asset(
                                'assets/images/generatePoster_image.png',
                                width: setWidth(100),
                                height: setWidth(100),
                                fit: BoxFit.cover,
                              ),
                              SizedBox(
                                height: setWidth(30),
                              ),
                              Text(
                                '生成海报',
                                style: TextStyle(
                                  color: Color(0xff333333),
                                  fontSize: 13,
                                ),
                              ),
                            ],
                          ),
                        ),
                      ],
                    ),
                    SizedBox(
                      height: setWidth(66),
                    ),
                  ],
                ),
              ),
            ],
          );
        });
  }

  // 海报
  _generatePosterWidget() {
    return showDialog(
      context: context,
      builder: (context) {
        return Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Row(
              mainAxisAlignment: MainAxisAlignment.end,
              children: [
                Row(
                  children: [
                    InkWell(
                      onTap: () {
                        print('删除 按钮点击事件 ！！！');
                        Navigator.pop(context);
                      },
                      child: Image.asset(
                        'assets/images/closeqrcode.png',
                        width: 28,
                        height: 28,
                        fit: BoxFit.cover,
                      ),
                    ),
                    SizedBox(
                      width: (MediaQuery.of(context).size.width - 327) / 2,
                    ),
                  ],
                ),
              ],
            ),
            SizedBox(
              height: 16,
            ),
            Container(
              width: 327,
              height: 500,
              decoration: BoxDecoration(
                image: DecorationImage(
                  image: AssetImage('assets/images/qrcode.png'),
                  fit: BoxFit.cover,
                ),
              ),
              padding: EdgeInsets.all(16),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  // 用户信息
                  Row(
                    children: [
                      ClipRRect(
                        borderRadius: BorderRadius.circular(16),
                        child: Image.asset(
                          'assets/images/avatar.png',
                          width: 32,
                          height: 32,
                          fit: BoxFit.cover,
                        ),
                      ),
                      SizedBox(
                        width: 8,
                      ),
                      Expanded(
                        child: Container(
                          height: 32,
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '小凡',
                                maxLines: 1,
                                overflow: TextOverflow.ellipsis,
                                style: TextStyle(
                                  color: Colors.white,
                                  fontSize: 14,
                                ),
                              ),
                              Text(
                                '为您挑选了一个好物～',
                                maxLines: 1,
                                overflow: TextOverflow.ellipsis,
                                style: TextStyle(
                                  color: Colors.white,
                                  fontSize: 9,
                                ),
                              ),
                            ],
                          ),
                        ),
                      ),
                    ],
                  ),
                  SizedBox(
                    height: 23,
                  ),
                  // 商品图片 价格 销量
                  Padding(
                    padding: EdgeInsets.symmetric(horizontal: 15),
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Image.asset(
                          'assets/images/goods_images.jpeg',
                          width: 265,
                          height: 265,
                          fit: BoxFit.cover,
                        ),
                        SizedBox(
                          height: 6,
                        ),
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: [
                            Text.rich(
                              TextSpan(
                                children: [
                                  TextSpan(
                                    text: '折后价',
                                    style: TextStyle(
                                      color: Color(0xffD0021B),
                                      fontSize: 12,
                                    ),
                                  ),
                                  TextSpan(
                                    text: '￥',
                                    style: TextStyle(
                                      color: Color(0xffE11A31),
                                      fontSize: 16,
                                    ),
                                  ),
                                  TextSpan(
                                    text: '49.',
                                    style: TextStyle(
                                      color: Color(0xffE11A31),
                                      fontSize: 28,
                                    ),
                                  ),
                                  TextSpan(
                                    text: '00',
                                    style: TextStyle(
                                      color: Color(0xffE11A31),
                                      fontSize: 16,
                                    ),
                                  ),
                                ],
                              ),
                            ),
                            Text(
                              '已售211件',
                              style: TextStyle(
                                color: Color(0xffA3A3A3),
                                fontSize: 12,
                              ),
                            ),
                          ],
                        ),
                        SizedBox(
                          height: 5,
                        ),
                        Text(
                          '¥69.00',
                          style: TextStyle(
                            color: Color(0xffadadad),
                            fontSize: 14,
                            decoration: TextDecoration.lineThrough,
                          ),
                        ),
                      ],
                    ),
                  ),
                  // 图片名字
                  Padding(
                    padding: EdgeInsets.only(
                      left: 15,
                    ),
                    child: Row(
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Expanded(
                          child: Text(
                            '正宗新西兰佳沛奇异果 黄心的宝宝最爱',
                            maxLines: 2,
                            overflow: TextOverflow.ellipsis,
                            style: TextStyle(
                              color: Color(0xff262626),
                              fontSize: 16,
                            ),
                          ),
                        ),
                        SizedBox(
                          width: 15,
                        ),
                        Image.asset(
                          'assets/images/avatar.png',
                          width: 80,
                          height: 80,
                          fit: BoxFit.cover,
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            ),
            SizedBox(
              height: 20,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                InkWell(
                  onTap: () {
                    print('保存图片  按钮点击事件  ！！！！');
                  },
                  child: Container(
                    width: 200,
                    height: 44,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(22),
                      border: Border.all(
                        color: Colors.white,
                        width: 1,
                      ),
                    ),
                    alignment: Alignment.center,
                    child: Text(
                      '保存图片',
                      style: TextStyle(
                        color: Colors.white,
                        fontSize: 17,
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ],
        );
      },
    );
  }

  // 规格弹框
  _specificationsShow() {
    return showDialog(
      context: context,
      useSafeArea: false,
      builder: (context) {
        return Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisAlignment: MainAxisAlignment.end,
          children: [
            Stack(
              children: [
                Container(
                  decoration: BoxDecoration(
                    color: Colors.white,
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(setWidth(20)),
                      topRight: Radius.circular(setWidth(20)),
                    ),
                  ),
                  child: Column(
                    children: [
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Container(
                            padding: EdgeInsets.only(
                              left: setWidth(22),
                              top: setWidth(22),
                              right: setWidth(22),
                            ),
                            child: Row(
                              crossAxisAlignment: CrossAxisAlignment.end,
                              children: [
                                Image.asset(
                                  'assets/images/goods_images.jpeg',
                                  width: setWidth(180),
                                  height: setWidth(180),
                                  fit: BoxFit.cover,
                                ),
                                SizedBox(
                                  width: setWidth(20),
                                ),
                                Expanded(
                                  child: Container(
                                    child: Column(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      children: [
                                        Text(
                                          '¥189.00',
                                          style: TextStyle(
                                            color: Color(0xffea5504),
                                            fontSize: 20,
                                          ),
                                        ),
                                        Padding(
                                          padding: EdgeInsets.only(
                                            top: setWidth(20),
                                            bottom: setWidth(12),
                                          ),
                                          child: Text(
                                            '库存：344',
                                            style: TextStyle(
                                              color: Color(0xff999999),
                                              fontSize: 12,
                                            ),
                                          ),
                                        ),
                                        Text(
                                          '已选：优惠127个装；5.5/38',
                                          style: TextStyle(
                                            color: Color(0xff999999),
                                            fontSize: 12,
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                ),
                              ],
                            ),
                          ),
                          SizedBox(
                            height: setWidth(14),
                          ),
                          Divider(
                            height: setWidth(1),
                            color: Color(0xffEFEFEF),
                            indent: 0,
                            endIndent: 0,
                          ),
                          Padding(
                            padding:
                                EdgeInsets.symmetric(horizontal: setWidth(24)),
                            child: Column(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Padding(
                                  padding: EdgeInsets.only(
                                    top: setWidth(44),
                                    bottom: setWidth(18),
                                  ),
                                  child: Text(
                                    '规格',
                                    style: TextStyle(
                                      color: Color(0xff333333),
                                      fontSize: 14,
                                    ),
                                  ),
                                ),
                                Wrap(
                                  spacing: setWidth(20),
                                  runSpacing: setWidth(20),
                                  children: [
                                    '澎湃心动力系列，16升冷零水',
                                    '经典恒温系列',
                                    '经典恒温系列1'
                                  ]
                                      .asMap()
                                      .map((key, value) {
                                        return MapEntry(
                                          key,
                                          Row(
                                            mainAxisSize: MainAxisSize.min,
                                            children: [
                                              Container(
                                                padding: EdgeInsets.symmetric(
                                                    horizontal: setWidth(22)),
                                                height: setWidth(52),
                                                decoration: BoxDecoration(
                                                  borderRadius:
                                                      BorderRadius.circular(
                                                          setWidth(26)),
                                                  border: Border.all(
                                                    color: Color(0xffcccccc),
                                                    width: setWidth(1),
                                                  ),
                                                ),
                                                alignment: Alignment.center,
                                                child: Text(
                                                  value,
                                                  style: TextStyle(
                                                    color: Color(0xff222222),
                                                    fontSize: 13,
                                                  ),
                                                ),
                                              ),
                                            ],
                                          ),
                                        );
                                      })
                                      .values
                                      .toList(),
                                ),
                                Padding(
                                  padding: EdgeInsets.only(
                                    top: setWidth(44),
                                    bottom: setWidth(18),
                                  ),
                                  child: Text(
                                    '型号',
                                    style: TextStyle(
                                      color: Color(0xff333333),
                                      fontSize: 14,
                                    ),
                                  ),
                                ),
                                Wrap(
                                  spacing: setWidth(20),
                                  runSpacing: setWidth(20),
                                  children: [
                                    '澎湃心动力系列，16升冷零水',
                                    '1XFHWYEWI',
                                    '经典恒温系列1'
                                  ]
                                      .asMap()
                                      .map((key, value) {
                                        return MapEntry(
                                          key,
                                          Row(
                                            mainAxisSize: MainAxisSize.min,
                                            children: [
                                              Container(
                                                padding: EdgeInsets.symmetric(
                                                    horizontal: setWidth(22)),
                                                height: setWidth(52),
                                                decoration: BoxDecoration(
                                                  borderRadius:
                                                      BorderRadius.circular(
                                                          setWidth(26)),
                                                  border: Border.all(
                                                    color: Color(0xffcccccc),
                                                    width: setWidth(1),
                                                  ),
                                                ),
                                                alignment: Alignment.center,
                                                child: Text(
                                                  value,
                                                  style: TextStyle(
                                                    color: Color(0xff222222),
                                                    fontSize: 13,
                                                  ),
                                                ),
                                              ),
                                            ],
                                          ),
                                        );
                                      })
                                      .values
                                      .toList(),
                                ),
                              ],
                            ),
                          ),
                        ],
                      ),
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          SizedBox(
                            height: setWidth(40),
                          ),
                          Divider(
                            height: setWidth(1),
                            color: Color(0xffEFEFEF),
                            indent: 0,
                            endIndent: 0,
                          ),
                          SizedBox(
                            height: setWidth(40),
                          ),
                          Padding(
                            padding:
                                EdgeInsets.symmetric(horizontal: setWidth(24)),
                            child: Row(
                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
                              children: [
                                Text(
                                  '数量',
                                  style: TextStyle(
                                    color: Color(0xff333333),
                                    fontSize: 14,
                                  ),
                                ),
                                Row(
                                  children: [
                                    InkWell(
                                      onTap: () {
                                        print('+++++++++ 减号 点击事件！！！');
                                      },
                                      child: Image.asset(
                                        'assets/images/reduce.png',
                                        width: setWidth(44),
                                        height: setWidth(44),
                                        fit: BoxFit.cover,
                                      ),
                                    ),
                                    Container(
                                      width: setWidth(90),
                                      alignment: Alignment.center,
                                      child: Text(
                                        '1',
                                        maxLines: 1,
                                        overflow: TextOverflow.ellipsis,
                                        style: TextStyle(
                                          color: Color(0xff333333),
                                          fontSize: 18,
                                        ),
                                      ),
                                    ),
                                    InkWell(
                                      onTap: () {
                                        print('+++++++++ 加号 点击事件！！！');
                                      },
                                      child: Image.asset(
                                        'assets/images/plus.png',
                                        width: setWidth(44),
                                        height: setWidth(44),
                                        fit: BoxFit.cover,
                                      ),
                                    ),
                                  ],
                                ),
                              ],
                            ),
                          ),
                          SizedBox(
                            height: setWidth(56),
                          ),
                          Padding(
                            padding:
                                EdgeInsets.symmetric(horizontal: setWidth(40)),
                            child: Row(
                              children: [
                                InkWell(
                                  onTap: () {
                                    print('加入购物车  点击事件！！！');
                                  },
                                  child: Container(
                                    width: setWidth(335),
                                    height: setWidth(80),
                                    decoration: BoxDecoration(
                                      color: Color(0xffea5504),
                                      borderRadius: BorderRadius.only(
                                        topLeft: Radius.circular(setWidth(40)),
                                        bottomLeft:
                                            Radius.circular(setWidth(40)),
                                      ),
                                    ),
                                    alignment: Alignment.center,
                                    child: Text(
                                      '加入购物车',
                                      style: TextStyle(
                                        color: Colors.white,
                                        fontSize: 15,
                                      ),
                                    ),
                                  ),
                                ),
                                InkWell(
                                  onTap: () {
                                    print('加入购物车  点击事件！！！');
                                  },
                                  child: Container(
                                    width: setWidth(335),
                                    height: setWidth(80),
                                    decoration: BoxDecoration(
                                      color: Color(0xff210F0F),
                                      borderRadius: BorderRadius.only(
                                        topRight: Radius.circular(setWidth(40)),
                                        bottomRight:
                                            Radius.circular(setWidth(40)),
                                      ),
                                    ),
                                    alignment: Alignment.center,
                                    child: Text(
                                      '立即购买',
                                      style: TextStyle(
                                        color: Colors.white,
                                        fontSize: 15,
                                      ),
                                    ),
                                  ),
                                ),
                              ],
                            ),
                          ),
                          SizedBox(
                            height: setWidth(34),
                          ),
                        ],
                      ),
                    ],
                  ),
                ),
                Positioned(
                  top: setWidth(16),
                  right: setWidth(18),
                  child: InkWell(
                    onTap: () {
                      print('删除 按钮点击事件！！！');
                      Navigator.pop(context);
                    },
                    child: Container(
                      width: setWidth(50),
                      height: setWidth(50),
                      padding: EdgeInsets.all(setWidth(10)),
                      child: Image.asset(
                        'assets/images/close_images.png',
                        width: setWidth(30),
                        height: setWidth(30),
                        fit: BoxFit.cover,
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ],
        );
      },
    );
  }
}
